<template>
    <h1>学生介绍</h1>
    <div>姓名:{{ name }}</div>
    <div>年龄:{{ age }}</div>
    <div>职位:{{ job }}</div>
    <button @click="update">修改</button>
</template>
<script lang='ts' setup>
import {storeToRefs} from 'pinia'
import {useStudentStore} from '@/store/student'
const {name,age,job}=storeToRefs(useStudentStore())
const {modifyStudentInfo}=useStudentStore()
console.log('name',name);



const update=()=>modifyStudentInfo('王丽',23,"班长")
</script>
<style lang='scss' scoped>
</style>